Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user image frames and other updates #112

Merged
merged 3 commits into from
Apr 9, 2024
Merged

user image frames and other updates #112

merged 3 commits into from
Apr 9, 2024

Conversation

aconchillo
Copy link
Contributor

No description provided.


@ transport.event_handler("on_first_other_participant_joined")
async def on_first_other_participant_joined(transport, participant):
transport.render_participant_video(participant["id"], color_format="RGB")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to say "let's make RGB the default" but I see you already did that 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, actually, since it's the default, let me remove this from here.

curr_time = time.time()
prev_time = self._video_renderers[participant_id]["timestamp"]
diff_time = curr_time - prev_time
period = 1 / self._video_renderers[participant_id]["framerate"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I know we'll need eventually is an "only on demand" option instead of always setting a frame rate. My way of doing that was maybe a bit clunky but it worked well—by setting the frame rate to 0, the transport would never send frames automatically, but the pipeline could request a new image for a participant by sending a certain frame type (RequestUserImage or something). Can we add that back in a follow-up PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, sure! makes sense!

@aconchillo aconchillo merged commit 4f04b10 into main Apr 9, 2024
3 checks passed
@aconchillo aconchillo deleted the user-image-frame branch October 23, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants